<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .container {
            padding-left: 15px;
            padding-right: 15px;
            margin-left: auto;
            margin-right: auto;
        }

        /* + 超小屏幕（手机，小于 768px）：设置宽度为 100%
        + 小屏幕（平板，大于等于 768px）：设置宽度为 750px
        + 中等屏幕（桌面显示器，大于等于 992px）：宽度设置为 970px
        + 大屏幕（大桌面显示器，大于等于 1200px）：宽度设置为 1170px  */
        @media screen and (max-width: 767px){
            .container {
                width: 100%;
            }
        }

        @media screen and (min-width: 768px){
            .container {
                width: 750px;
            }
        }

        @media screen and (min-width: 992px){
            .container {
                width: 970px;
            }
        }

        @media screen and (min-width: 1200px){
            .container {
                width: 1170px;
            }
        }

        .content {
            height: 300px;
            background-color: lightblue;
        }

    </style>
</head>
<body>
    <div class="container">
        <div class="content">

        </div>


    </div>
</body>
</html>